﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rabbit.lnfarnum
{
    public interface IBaseRepository<T> where T : class,new()
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<int> Add(T entity);
        /// <summary>
        /// 查询全部
        /// </summary>
        /// <returns></returns>
        IQueryable<T> GetAll();

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<int> Update(T entity);

        /// <summary>
        /// 批量添加
        /// </summary>
        /// <param name="entitvs"></param>
        /// <returns></returns>
        public Task<int> AddRanges(List<T> entitvs);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="entitvs"></param>
        /// <returns></returns>
        public Task<int> DeleteRemove(List<T> entitvs);


        



    }
}
